import businessIndex from "@/views/business/index.vue"
import login from "@/views/business/login.vue"
import register from "@/views/business/register.vue"
import profile from "@/views/business/profile.vue"
import email from "@/views/business/email.vue"
import record from "@/views/business/record.vue"
import confirm from "@/views/business/confirm.vue"
import payment from "@/views/business/payment.vue"
import payRecord from "@/views/business/payRecord.vue"

// 子路由列表
const routes = [
    {
        'name':"businessIndex",
        'path':"index",
        component:businessIndex,
        meta:{login:true}
    },
    {
        'name':"login",
        'path':"login",
        component:login,
        meta:{login:false}
    },
    {
        'name':"register",
        'path':"register",
        component:register,
        meta:{login:false}
    },
    {
        'name':"profile",
        'path':"profile",
        component:profile,
        meta:{login:true}
    },
    {
        'name':"email",
        'path':"email",
        component:email,
        meta:{login:true}
    },
    {
        'name':"record",
        'path':"record",
        component:record,
        meta:{login:true}
    },
    {
        'name':"payment",
        'path':"payment",
        component:payment,
        meta:{login:true}
    },
    {
        'name':"confirm",
        'path':"confirm",
        component:confirm,
        meta:{login:true}
    },
    {
        'name':"payRecord",
        'path':"payRecord",
        component:payRecord,
        meta:{login:true}
    },
]

// 创建父路由
const parentRouter = {
    template:"<router-view></router-view>"
}

export default [{
    name:"business",
    component:parentRouter,
    path:"/business",
    children:routes
}]

